<template>
  <view>
    <uni-card :title="notice.title" :extra="notice.createDatetime">
      <mp-html :content="notice.content"></mp-html>
    </uni-card>

  </view>
</template>

<script>
import {NoticeService} from "./noticeService";
import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html'
export default {
  components: {
    mpHtml
  },
  data() {
    return {
      notice: {},
    }
  },
  onLoad(options) {
    var data = options.id
    this.init(data);
  },
  methods: {
    init(id) {
      // console.log(id)
      NoticeService.findNotice(id).then(res => {
        console.log(res)
        this.notice = res.data;
      })
    },

  }
}
</script>

<style>

</style>
